Skip to main content

revXMLAttribute

Type

function

Summary

Returns the value of the specified attribute of the specified node of an XML tree.

Syntax

revXMLAttribute(<treeID>, <node>, <attributeName>)

Description

Use the revXMLAttribute function to get an attribute's value.

If the revXMLAttribute function encounters an error, it returns an error message starting with "xmlerr".

Important

The revXMLAttribute function is part of the XML library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.

Parameters

NameTypeDescription

treeID

The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree.

node

The path to the node whose attribute value you want to get.

attributeName

The name of the attribute.

Examples

revXMLAttribute(2,"/","Timestamp")
put revXMLAttribute(currTree,currNode,the short name of field x) \
into field x

control structure: function

function: revXMLAttributes, revXMLNodeContents, revXMLCreateTree, revXMLCreateTreeFromFile

glossary: LiveCode custom library, node, Standalone Application Settings, standalone application, return, attribute, XML tree

keyword: string

library: XML library

Compatibility and Support

Introduced

LiveCode 2.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?